WRAP_NON_TEMPLATE_CLASS("itk::OnePlusOneEvolutionaryOptimizer")

  SET(MANAGED_TYPE_TEMPLATE ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedSingleValuedNonLinearOptimizer_TYPE.cxx.in)
  WRAP_INCLUDE_TYPE("itkNormalVariateGenerator.h")

  BEGIN_MANAGED_PROPERTY("Maximize" SET)
    SET(MANAGED_PROPERTY_SUMMARY   "Set if the optimizer maximizes or minimizes the cost function.")
    SET(MANAGED_PROPERTY_TYPE      "bool")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetMaximize( value );")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("MaximumIteration" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set maximum iteration limit.")
    SET(MANAGED_PROPERTY_TYPE      "unsigned int")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetMaximumIteration( value );")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetMaximumIteration();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("CurrentIteration" GET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get the number of elapsed iterations.")
    SET(MANAGED_PROPERTY_TYPE      "unsigned int")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetCurrentIteration();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("GrowthFactor" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the search radius grow factor in parameter space.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetGrowthFactor( value );")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetGrowthFactor();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("ShrinkFactor" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the search radius shrink factor.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetShrinkFactor( value );")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetShrinkFactor();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("InitialRadius" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set initial search radius in parameter space.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetInitialRadius( value );")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetInitialRadius();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("Epsilon" GETSET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get/set the minimal size of search radius (frobenius_norm of covariance matrix).")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_SET_BODY  "m_PointerToNative->SetEpsilon( value );")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetEpsilon();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_PROPERTY("FrobeniusNorm" GET)
    SET(MANAGED_PROPERTY_SUMMARY   "Get the current Frobenius norm of covariance matrix.")
    SET(MANAGED_PROPERTY_TYPE      "double")
    SET(MANAGED_PROPERTY_GET_BODY  "return m_PointerToNative->GetFrobeniusNorm();")
  END_MANAGED_PROPERTY()

  BEGIN_MANAGED_METHOD("GetValue")
    SET(MANAGED_METHOD_INTERFACE       OFF)
    SET(MANAGED_METHOD_SUMMARY         "Get the current value.")
    SET(MANAGED_METHOD_RETURN_TYPE     "double")
    SET(MANAGED_METHOD_PARAMS          "void")
    SET(MANAGED_METHOD_TYPE_BODY       "return m_PointerToNative->GetValue();")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_METHOD("StopOptimization")
    SET(MANAGED_METHOD_INTERFACE       OFF)
    SET(MANAGED_METHOD_SUMMARY         "Stop the optimization algorithm.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "void")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->StopOptimization( );")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_METHOD("Initialize")
    SET(MANAGED_METHOD_INTERFACE       OFF)
    SET(MANAGED_METHOD_SUMMARY         "Initializes the optimizer. Before running this optimizer, this function should have been called. The growth and shrink factors are initialized to default values.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "double initialRadius")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->Initialize( initialRadius );")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_METHOD("Initialize")
    SET(MANAGED_METHOD_INTERFACE       OFF)
    SET(MANAGED_METHOD_SUMMARY         "Initializes the optimizer. Before running this optimizer, this function should have been called.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "double initialRadius, double grow, double shrink")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->Initialize( initialRadius, grow, shrink );")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_METHOD("SetNormalVariateGenerator")
    SET(MANAGED_METHOD_INTERFACE       OFF)
    SET(MANAGED_METHOD_SUMMARY         "Set the normal variate generator to an instance of itk::Statistics::NormalVariateGenerator with seed 12345.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "void")
    SET(MANAGED_METHOD_TYPE_BODY       "SetNormalVariateGenerator(12345);")
  END_MANAGED_METHOD()

  BEGIN_MANAGED_METHOD("SetNormalVariateGenerator")
    SET(MANAGED_METHOD_INTERFACE       OFF)
    SET(MANAGED_METHOD_SUMMARY         "Set the normal variate generator to an instance of itk::Statistics::NormalVariateGenerator with given seed.")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "int seed")
    SET(MANAGED_METHOD_TYPE_BODY       "typedef itk::Statistics::NormalVariateGenerator NormalGeneratorType; NormalGeneratorType::Pointer generator = NormalGeneratorType::New(); generator->Initialize(seed); m_PointerToNative->SetNormalVariateGenerator( generator );")
  END_MANAGED_METHOD()

END_WRAP_NON_TEMPLATE_CLASS()
